/*
Michael Hankinson	
Proposal title: How Group Identity Shapes Opioid Treatment Policy Opinion

HYPOTHESES

Stated-Hyp1: "we expect that policy benefciaries' race, gender, and location in an urban or non-urban location will affect support for treatment policies." (p. 3)

	Test-Hyp1: Policy benefciaries' race will affect support for treatment policies. (white vs. black)
	
	Test-Hyp2: Policy benefciaries' gender will affect support for treatment policies. (man vs. woman)	
	
	Test-Hyp3: policy benefciaries' location in an urban or non-urban location will affect support for treatment policies.


Stated-Hyp2: "an individual's specific pathway to addiction via either legal prescriptions for painkillers or illegally obtained opioids (prescription medications or street drugs) may also affect perceptions of the recipient's deservingness of treatment."
	
	// Can't test because deservingness measure wasn't fielded.
	
Stated-Hyp3: "We expect that different pathways to addiction will alter perceptions of responsibility for addiction and further sway policy opinions" (p. 3)

	Test-Hyp4: Pathway to addiction (legal vs. illegal) will affect support for treatment policies.	
	
Stated-Hyp4: "We expect that when people receive treatment for addiction from private insurance,
Republicans (Democrats) will be more (less) supportive of treatment program funding than
when it is provided by ACA-subsidized insurance or Medicaid." (p. 3)

	Test-Hyp5: Republicans will be more supportive than Democrats of treatment program funding 
when it is provided by private insurance.

	Test-Hyp6: Democrats will be more supportive than Democrats of treatment program funding when it is provided by ACA/Medicaid.

	
********************************************************************************
* NOTES

- The authors wrote in the reviewer memo that their "primary hypothesis is 
identity matching" (page #2 of the attached document). However, in their revised 
proposal, they don't have any identity matching hypotheses (page #17). 

- there is no measure of deservingness.
the proposed measure of deservingness in the proposal was (page #5 of proposal):
"to assess our hypothesized mechanism of deservingness, we will ask respondents 
whether they believe the policy recipient is deserving of publicly-supported 
treatment."

- proposal doesn't clarify what urban means. Experiment has 3 location 
conditions: urban, suburb, and rural. We are using this as a continuous measure, 
regarding suburb as in between rural and urban.

*/


use "Hankinson1070.dta", clear

********************************************************************************

* INDICATORS OF EXPERIMENTAL MANIPULATIONS

* beneficiary race
	/*
	Race x Gender	
	1	Black woman
	2	White woman
	3	Black man
	4	White man
	*/
	tab P_VIG
	recode P_VIG (1=1) (2=0) (3=1) (4=0), gen(benefic_black)
	tab benefic_black

* beneficiary gender
	tab P_VIG
	recode P_VIG (1/2=1) (3/4=0), gen(benefic_woman)
	tab benefic_woman
	
* beneficiary location
	/*
	Geographic location	
	1	a rural farm
	2	a quiet suburb
	3	an urban downtown center
	*/
	tab P_GEO
	clonevar urban = P_GEO 
	
* Route of addiction	
	/*
	1	He/She injured his/her knee and needed surgery,His/her doctors prescribed him/her OxyContin pills for the pain during hi
	2	His/her friend illegally gave him/her OxyContin pain pills at a party.
	3	His/her friend gave him/her heroin at a party.
	*/
	tab P_PATHA
	recode P_PATHA (1=1) (2/3=0), gen(path_legal)
	tab path_legal
	
*Insurance type	
	/*
	1	Insurance purchased from a private provider
	2	Insurance purchased through the Affordable Care Act/Obamacare marketplace
	3	Insurance coverage from the state’s Medicaid expansion, funded by the Affordable Care Act/Obamacare
	*/
	tab P_PATHI
	recode P_PATHI (1=1) (2/3=0), gen(pvt_insurance)
	tab pvt_insurance
	
* OUTCOME MEASURES

* support for federal funding of treatment

/*
Q1	If you were making up the budget for the federal government this year, would you increase, decrease, or keep spending the same for treatment for those addicted to opioids?
*/

	tab Q1
	replace Q1=. if Q1>5 // recode missing
	gen support_treatment=6-Q1 
	tab support_treatment

* deservingness
	// no data collected
 	
* MODERATORS

*Political party affiliation	
	/*
	1	Strong Democrat
	2	Moderate Democrat
	3	Lean Democrat
	4	Don’t Lean/Independent/None
	5	Lean Republican
	6	Moderate Republican
	7	Strong Republican
	*/
	tab P_PARTYID
	recode P_PARTYID (1/3=1) (5/7=0) (4=.), gen(resp_democrat)
	tab resp_democrat
	
********************************************************************************

* ANALYSIS
	

*Test-Hyp1: Policy benefciaries' race will affect support for treatment policies. (white vs. black)
	reg support_treatment i.benefic_black
	// reject. 0.693 
	tess 1.benefic_black, init(Hankinson1070)
	
*Test-Hyp2: Policy benefciaries' gender will affect support for treatment policies. (man vs. woman)	
	reg support_treatment i.benefic_woman	
	// reject. 0.763
	tess 1.benefic_woman
	
*Test-Hyp3: policy benefciaries' location in an urban or non-urban location will affect support for treatment policies.
	reg support_treatment urban
	// reject. 0.193
	tess urban
	
*Test-Hyp4: Pathway to addiction (legal vs. illegal) will affect support for treatment policies.	
	reg support_treatment i.path_legal
	// reject. 0.579
	tess 1.path_legal
	
*Test-Hyp5: Republicans will be more supportive than Democrats of treatment program funding when it is provided by private insurance.
	reg support_treatment i.resp_democrat if pvt_insurance==1
	// reject. P=0.000W (democrats are more supportive)
	tess 1.resp_democrat -

*Test-Hyp6: Democrats will be more supportive than Democrats of treatment program funding when it is provided by ACA/Medicaid.
	reg support_treatment i.resp_democrat if pvt_insurance==0
	// do not reject. P=0.000
	tess 1.resp_democrat +
